export default function ({ route, redirect }) {
  if (route.path !== '/' && route.path.endsWith('/')) {
    redirect(301, route.path.slice(0, -1))
  }
  if (route.path == '/download-mp3') {
    redirect(301, '/download-tiktok-mp3')
  }
  if (route.path == '/download-MP3') {
    redirect(301, '/download-tiktok-mp3')
  }
  if (route.path == '/download-story') {
    redirect(301, '/download-tiktok-story')
  }
  if (route.path == '/en') {
    redirect(301, '/')
  }
  if (route.path == '/en/download-tiktok-mp3') {
    redirect(301, '/download-tiktok-mp3')
  }
  if (route.path == '/en/download-tiktok-story') {
    redirect(301, '/download-tiktok-story')
  }
}